

<!DOCTYPE html>
<html data-dpr="1" style="font-size:62.5%;">
<head lang="en">
    <meta charset="UTF-8">
    <!-- 优先使用 IE 最新版本和 Chrome -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <!-- 为移动设备添加 viewport -->
    <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=3.0, minimum-scale=1.0, user-scalable=no">
    <!-- iOS 设备适配代码Star-->
    <!-- 添加到主屏后的标题（iOS 6 新增） -->
    <meta name="apple-mobile-web-app-title" content="UU商城">
    <!-- 是否启用 WebApp 全屏模式，删除苹果默认的工具栏和菜单栏 -->
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <!-- 设置苹果工具栏颜色 -->
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <!-- 添加智能 App 广告条 Smart App Banner（iOS 6+ Safari） -->
    <meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
    <!-- 忽略页面中的数字识别为电话，忽略email识别 -->
    <meta name="format-detection" content="telephone=no"><!--电话数字样式去掉 苹果-->
    <link rel="stylesheet" href="http://www.shierdao.net/html/css/tixian.css">
    <title>提现</title>
    <style>

    </style>
</head>
<body>
<!--<form>
    <input type="hidden" name="userid" value="<?/*=($_GET["userid"]);*/?>">

    <div  class="form-item form-item-account" id="form-item-account">
        <label>提現金額</label>
        <input style="height: 50px;" type="text" id="form-account" name="money" class="field" autocomplete="off" maxlength="20"
               placeholder="最少20"/>

        <span class="i-status">元</span>
    </div>
    <div class="form-item form-item-account" style="background:#f0f0f0;">
        <p>可提現金額<span><?/*=($_GET["usermoney"]/10);*/?></span>元</p>

    </div>
    <div class="form-item form-item-account">
        <label>姓名</label>
        <input type="text" name="username" class="field" autocomplete="off" maxlength="20"
               placeholder="請輸入真實姓名"  />

    </div>
    <div class="form-item form-item-account">
        <label>銀行卡號</label>
        <input type="text"  name="card" class="field" autocomplete="off" maxlength="20"
               placeholder="請輸入銀行卡號" />

    </div>
    <div class="form-item form-item-account" >
        <label>銀行</label>
        <input type="text"  name="bank" class="field" autocomplete="off" maxlength="20"
               placeholder="請輸入銀行名稱" />

    </div>
    <div class="form-item form-item-account" style=" border:none;">
        <label>身份證</label>
        <input type="text" name="Idcard" class="field" autocomplete="off" maxlength="20"
               placeholder="請輸入身份證號" />
    </div>
    <div style="width:100%;height:20px;background:#f0f0f0;"></div>
    <div class="form-item form-item-account" >
        <label>手機號</label>
        <input id="phone" type="text" name="phone" class="field" autocomplete="off" maxlength="20"
               placeholder="請輸入帶區號的手機號" />
    </div>
    <div class="form-item form-item-account" >
        <input type="text" name="verify" class="field" autocomplete="off" maxlength="20"
               placeholder="請輸入手機號" />
        <a  onclick="getCode(this)" id="yzm">獲取驗證碼</a>
        <a style="display:none;" id="J_resetCode"><span id="J_second">60</span>秒后重发</a>

    </div>

</form>-->
<!--<div class="form-xx">
    <p>*請填寫真實資料並確認無誤，否則將導致提現失效</p>
    <p>1,姓名和銀行卡戶主姓名必須保持壹致</p>
    <p>2,姓名和實名認證姓名必須保持壹致</p>
</div>-->
<!--<p id="submit" class="form-btn">確認提現</p>
--><script src="http://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.min.js"></script>

<script>

    /*获取验证码*/
    var isPhone = 1;
    function getCode(e){
        checkPhone(); //验证手机号码
        if(isPhone){
            resetCode(); //倒计时
            sendyzm();
        }else{
            $('#phone').focus();
        }

    }
    //验证手机号码
    function checkPhone(){
        var phone = $('#phone').val();
        var pattern = /^1[0-9]{10}$/;
        isPhone = 1;
        if(phone == '') {
            alert('请输入手机号码');
            isPhone = 0;
            return;
        }
        if(!pattern.test(phone)){
            alert('请输入正确的手机号码');
            isPhone = 0;
            return;
        }
    }
    //倒计时
    function resetCode(){
        $('#yzm').hide();
        $('#J_second').html('60');
        $('#J_resetCode').show();
        var second = 60;
        var timer = null;
        timer = setInterval(function(){
            second -= 1;
            if(second >0 ){
                $('#J_second').html(second);
            }else{
                clearInterval(timer);
                $('#yzm').show();
                $('#J_resetCode').hide();
            }
        },1000);
    }

    function sendyzm () {
        var phone = $("input[name='phone']").val();
        var userId = $("input[name='userid']").val();
        $.ajax({
            type:"POST",
            url:"http://www.shierdao.net/v1/users/tixianverify",
            data:{'phone_all':phone, 'userid':userId},
            dataType: "json",
            success:function (data) {

                if (data['code'] == 200) {
//                    alert('发送成功');
                } else {
//                    alert('内部错误');
                }
            }
        })

    }
    
    $(function () {
            var money = $("input[name='money']").val();
            var name = $("input[name='username']").val();
            var card = $("input[name='card']").val();
            var bank = $("input[name='bank']").val();
            var Idcard = $("input[name='Idcard']").val();
            var phone = $("input[name='phone']").val();
            var verify = $("input[name='verify']").val();
            var userId = $("input[name='userid']").val();
    //        var userId = $("#qq").val();
//            var userId = aa();
            $('#yzm').click(function () {
                var phone = $("input[name='phone']").val();
                var userId = $("input[name='userid']").val();
                $.ajax({
                    type:"POST",
                    url:"http://www.shierdao.net/v1/users/tixianverify",
                    data:{'phone_all':phone, 'userid':userId},
                    dataType: "json",
                    success:function (data) {

                        if (data['code'] == 200) {
//                            alert('发送成功');
                        } else {
//                            alert('内部错误');
                        }
                    }
                })

            });





            $('#submit').click(function(){

                var money = $("input[name='money']").val();
                var name = $("input[name='username']").val();
                var card = $("input[name='card']").val();
                var bank = $("input[name='bank']").val();
                var Idcard = $("input[name='Idcard']").val();
                var phone = $("input[name='phone']").val();
                var verify = $("input[name='verify']").val();
                var userId = $("input[name='userid']").val();
//                console.log(11111);
                $.ajax({
                    type: "POST",
                    url: "http://www.shierdao.net/v1/users/money",
                    data: {'money':money, 'name':name, 'card':card, 'bank':bank, 'Idcard':Idcard, 'phone':phone, 'verify':verify, 'userid':userId},
                    dataType: "json",
                    success: function(data){

                        console.log(data);


                    }
                });
            });
        })

</script>


</body>
</html>
